<template>
<!-- import { METHODS } from 'http'; -->
 <tr>
     <td><input type="checkbox" v-model="person.checked"></td>
     <td>{{person.name}}</td>
     <td>{{person.price}}</td>
     <td><button @click="jian">-</button>{{person.num}} <button @click="jia">+</button> </td>
     <td>{{person.price*person.num}}</td>
     <td ><button @click="del">删除</button></td>
 </tr>
</template>
<script>
export default {
  props: ["person"],
  methods: {
    jia() {
      this.person.num++;
    },
    jian() {
      this.person.num--;
    },

    del() {
      this.$emit("delperson");
    }
  }
};
</script>
<style>
</style>